﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPageAdmin.Master" AutoEventWireup="true"
    CodeBehind="PortpolioManager.aspx.cs" Inherits="DesignLife.Admin.PortpolioManager" %>

<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="js/jquery.validate.js">
        
    </script>
    <style>
        .edit
        {
            width: 25px;
        }
        .deleted
        {
            width: 25px;
        }
        table
        {
            border-collapse: collapse;
            font-family: "Droid Sans" , "Arial" ,Verdana;
            font-size: 12px;
            text-align: left;
            width: 100%;
        }
        table th
        {
            background: none repeat scroll 0 0 #F4F4F4;
            border-bottom: 1px solid #DDDDDD;
            border-left: 1px solid #DDDDDD;
            box-shadow: 0 0 0 1px #FFFFFF inset;
            color: #5A5A5A;
            font-weight: bold;
            height: 40px;
            padding: 0 8px;
        }
        table th div
        {
            line-height: 40px;
        }
        table th:first-child
        {
            border-left: 0 none;
        }
        .module
        {
            width: 96%;
        }
        table td
        {
            background: none repeat scroll 0 0 transparent;
            border-left: 1px solid #DDDDDD;
            border-top: 1px solid #DDDDDD;
            color: #8B8B8B;
            height: 42px;
            padding: 0 8px;
            width: 31px;
        }
        table td:first-child
        {
            display: none;
        }
        table tr:hover td
        {
            background: none repeat scroll 0 0 #F1F4F7;
            box-shadow: 0 0 0 1px #FFFFFF inset;
        }
        
        p label
        {
            width: 117px;
            font-size: 15px;
            float: left;
            margin: 0 47px;
            height: 30px;
        }
      p input {
          height: 23px;
      }
      p input[type="submit"] {
          height: 35px;
      }
        .viewTables tr td:first-of-type {
            display: none;
        }
        
        .success
        {
            background: url("../images/icn_alert_success.png") no-repeat scroll 10px 10px #E2F6C5;
            border: 1px solid #79C20D;
            border-radius: 5px 5px 5px 5px;
            color: #32510F;
            display: block;
            font-size: 14px;
            margin: 20px 3% 0;
            padding: 10px 0;
            text-indent: 40px;
            width: 75%;
        }
        .error
        {
            background: url("../images/icn_alert_error.png") no-repeat scroll 10px 10px #F3D9D9;
            border: 1px solid #D20009;
            border-radius: 5px 5px 5px 5px;
            color: #7B040F;
            display: block;
            font-size: 14px;
            margin: 20px 3% 0;
            padding: 10px 0;
            text-indent: 40px;
            width: 75%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="flsAdd">
        <div class="success" id="div_success" runat="server">
            <asp:Label ID="lblSuccess" runat="server" /></div>
        <div class="error" id="div_error" runat="server">
            <asp:Label ID="lblError" runat="server" /></div>
        <p>
            <label>
                PortName :</label>
            <asp:TextBox ID="txtname" runat="server" CssClass="required"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtname" ErrorMessage="Required" ValidationGroup="A"></asp:RequiredFieldValidator>
        </p>
        <p>
            <label>
                Link :</label>
            <asp:TextBox ID="txtlink" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="Required" runat="server" 
                ControlToValidate="txtlink" ErrorMessage="Required" ValidationGroup="A"></asp:RequiredFieldValidator>
        </p>
        <p>
            <label>
                Image :</label>
            <asp:FileUpload ID="Fuimage" runat="server" />
            <asp:Button ID="btnsave" runat="server" Text="Save" OnClick="btnsave_Click" />
            <asp:TextBox ID="txtPath" runat="server" CssClass="text" Width="300px"></asp:TextBox>
            <asp:Label ID="lblthongbao" runat="server" Font-Size="11pt"></asp:Label>
            <p>
                <asp:Button ID="btnsubmit" runat="server" Text="Submit" 
                    OnClick="btnsubmit_Click" ValidationGroup="A" />
            </p>
    </div>
    <div id="dtlports">
        <table class="viewTables tablesorter">
            <thead>
                <tr>
                    <th class="head edit">
                        Edit
                    </th>
                    <th class="head deleted">
                        Delete
                    </th>
                    <th class="head deleted">
                        ID
                    </th>
                    <th class="head" style="width: 321px">
                        PortName
                    </th>
                    <th class="head" style="width: 274px">
                        Link
                    </th>
                    <th class="head">
                        Images
                    </th>
                </tr>
            </thead>
            <tr class="managerlist">
                <asp:DataList ID="dtlports" runat="server" OnEditCommand="Edit_Port" OnDeleteCommand="Delete_Port"
                    DataKeyField="PortID">
                    <ItemTemplate>
                        <td>
                            <asp:LinkButton ID="lbnedit" runat="server" CommandName="Edit">Edit</asp:LinkButton>
                        </td>
                        <td>
                            <asp:LinkButton ID="lbtdeleted" runat="server" CommandName="Delete">Deleted</asp:LinkButton>
                        </td>
                        <td style="width: 30px">
                            <asp:Label ID="lblID" runat="server" Text='<%#Eval("PortID") %>'></asp:Label>
                        </td>
                        <td style="width: 350px">
                            <%#Eval("PortName")%>
                        </td>
                        <td style="width: 300px">
                            <%#Eval("Link")%>
                        </td>
                        <td style="width: 200px">
                            <asp:Image ID="Image1" Width="200px" Height="200px" runat="server" ImageUrl='<%# Eval("Img") %>' />
                        </td>
                    </ItemTemplate>
                </asp:DataList>
               
            </tr>
        </table>
       
    </div>
     <cc1:CollectionPager ID="CollectionPager1" runat="server" PageSize="5" 
        ResultsStyle="PADDING-BOTTOM:6px;PADDING-TOP:6px;FONT-WEIGHT: bold;" 
        SliderSize="5" LabelStyle="20px" LabelText="" ResultsFormat="" 
        
        BackNextStyle="margin-top: -.25em;height:30px,font-size:15px;color:#41B7D8;" BackText="" 
        IgnoreQueryString="False" ControlCssClass="border:1px solid #ccc;"
        ControlStyle="font-size:20px;border:1px solid #cccccc;" 
        BackNextLinkSeparator="|">
                </cc1:CollectionPager>
</asp:Content>
